<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>渐变与透明属性</title>
		<style type="text/css">
			#box1{
				width: 400px;
				height: 400px;
				/*定义实线粗细1px，并且为红色*/
				border: solid 1px red;
				/*参数依次：渐变的方向、第一个颜色、第二个颜色*/
				background: linear-gradient(to bottom,#000000,#666666);
				/*设置不透明级别*/
				opacity: 0.5;	
			}
		</style>	
	</head>
	<body>
		<div id="box1"></div>
	</body>
</html>
